package com.example.loggingservice;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


import java.net.Socket;

@SpringBootApplication
@MapperScan("com.example.loggingservice.mapper")
public class LoggingServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(LoggingServiceApplication.class, args);
    }

    private static void checkMQConnection() {
        try (Socket socket = new Socket("127.0.0.1", 9876)) {
            System.out.println("✅ 成功连接到NameServer(127.0.0.1:9876)");
        } catch (Exception e) {
            System.err.println("❌❌ 无法连接到NameServer: " + e.getMessage());
            e.printStackTrace();
        }
    }
}
